package top.potmot.model.associations.real.treeNode

const val mysqlResult = """
[(ddl/all-tables.sql, DROP TABLE IF EXISTS `TREE_NODE`;

CREATE TABLE `TREE_NODE` (
    `ID` BIGINT NOT NULL AUTO_INCREMENT,
    `PARENT_ID` BIGINT DEFAULT NULL,
    PRIMARY KEY (`ID`)
)
  ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COMMENT = ''
  ROW_FORMAT = Dynamic;

ALTER TABLE `TREE_NODE`
    ADD CONSTRAINT `FK_TREE_NODE_PARENT`
        FOREIGN KEY (`PARENT_ID`)
            REFERENCES `TREE_NODE` (`ID`);

), (ddl/tree_node.sql, DROP TABLE IF EXISTS `TREE_NODE`;

CREATE TABLE `TREE_NODE` (
    `ID` BIGINT NOT NULL AUTO_INCREMENT,
    `PARENT_ID` BIGINT DEFAULT NULL,
    PRIMARY KEY (`ID`)
)
  ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COMMENT = ''
  ROW_FORMAT = Dynamic;

ALTER TABLE `TREE_NODE`
    ADD CONSTRAINT `FK_TREE_NODE_PARENT`
        FOREIGN KEY (`PARENT_ID`)
            REFERENCES `TREE_NODE` (`ID`);

)]
"""

const val postgresResult = """
[(ddl/all-tables.sql, DROP TABLE IF EXISTS "TREE_NODE" CASCADE;

CREATE TABLE "TREE_NODE" (
    "ID" BIGSERIAL NOT NULL,
    "PARENT_ID" BIGINT DEFAULT NULL,
    PRIMARY KEY ("ID")
);

ALTER TABLE "TREE_NODE"
    ADD CONSTRAINT "FK_TREE_NODE_PARENT"
        FOREIGN KEY ("PARENT_ID")
            REFERENCES "TREE_NODE" ("ID");

), (ddl/tree_node.sql, DROP TABLE IF EXISTS "TREE_NODE" CASCADE;

CREATE TABLE "TREE_NODE" (
    "ID" BIGSERIAL NOT NULL,
    "PARENT_ID" BIGINT DEFAULT NULL,
    PRIMARY KEY ("ID")
);

ALTER TABLE "TREE_NODE"
    ADD CONSTRAINT "FK_TREE_NODE_PARENT"
        FOREIGN KEY ("PARENT_ID")
            REFERENCES "TREE_NODE" ("ID");

)]
"""

const val h2Result = """
[(ddl/all-tables.sql, DROP TABLE IF EXISTS `TREE_NODE` CASCADE;

CREATE TABLE `TREE_NODE` (
    `ID` BIGINT NOT NULL AUTO_INCREMENT,
    `PARENT_ID` BIGINT DEFAULT NULL,
    PRIMARY KEY (`ID`)
);

ALTER TABLE `TREE_NODE`
    ADD CONSTRAINT `FK_TREE_NODE_PARENT`
        FOREIGN KEY (`PARENT_ID`)
            REFERENCES `TREE_NODE` (`ID`);

), (ddl/tree_node.sql, DROP TABLE IF EXISTS `TREE_NODE` CASCADE;

CREATE TABLE `TREE_NODE` (
    `ID` BIGINT NOT NULL AUTO_INCREMENT,
    `PARENT_ID` BIGINT DEFAULT NULL,
    PRIMARY KEY (`ID`)
);

ALTER TABLE `TREE_NODE`
    ADD CONSTRAINT `FK_TREE_NODE_PARENT`
        FOREIGN KEY (`PARENT_ID`)
            REFERENCES `TREE_NODE` (`ID`);

)]
"""
